#pragma once

#include <QFrame>

namespace Domy {

class ColorFrame : public QFrame
{
    Q_OBJECT
public:
    explicit ColorFrame(QWidget *parent = Q_NULLPTR);
    ~ColorFrame();

    void setColor(const QColor &color);

    QColor getColor() const;

signals:
    void signalColorChanged(const QColor &color);

protected:
    virtual void mouseReleaseEvent(QMouseEvent *event) override;

private:
    void updateDisplay();

private:
    QColor m_color;
};

} // namespace Domy
